using System.ComponentModel.DataAnnotations;
using SqlSugar;
using RuoVea.ExSugar.Entity;
using RuoVea.ExEnum;

namespace Gantt.Server.Models;

/// <summary>
/// 甘特图类型
/// </summary>
[SugarTable(nameof(GanttType), "甘特图类型")]
public class GanttType : EntityBase
{
    /// <summary>
    /// 项目的名称
    /// </summary>
    [Required]
    [StringLength(255)]
    [SugarColumn(ColumnDescription = "项目的名称")]
    public string? Name { get; set; }

    /// <summary>
    /// 项目的代码标识
    /// </summary>
    [Required]
    [StringLength(255)]
    [SugarColumn(ColumnDescription = "代码")]
    public string? Code { get; set; }

    /// <summary>
    /// 项目的颜色标识
    /// </summary>
    [Required]
    [StringLength(255)]
    [SugarColumn(ColumnDescription = "颜色")]
    public string? Color { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    [SugarColumn(ColumnDescription = "排序", IsNullable = true, DefaultValue = "10")]
    public int Sort { get; set; }

    /// <summary>
    /// 状态-正常_0、停用_1 
    /// </summary>
    [SugarColumn(ColumnDescription = "是否禁用", IsNullable = true)]
    public YesOrNot? IsDisable { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(100)]
    [SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Remark { get; set; }
}